package cn.edu.gzist.chapter02.domain;

//id=1001
//nickname=wangwu

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Component
@PropertySource("classpath:user.properties")
@ConfigurationProperties
public class User2 {
    private int id;
    private String nickname;

    @Override
    public String toString() {
        return "User2{" +
                "id=" + id +
                ", nickname='" + nickname + '\'' +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }
}
